import request from '@/utils/request'

// 查询地区列表
export function listRegions(query) {
  return request({
    url: '/system/regions/list',
    method: 'get',
    params: query
  })
}

// 查询地区详细
export function getRegions(regionId) {
  return request({
    url: '/system/regions/' + regionId,
    method: 'get'
  })
}

// 新增地区
export function addRegions(data) {
  return request({
    url: '/system/regions',
    method: 'post',
    data: data
  })
}

// 修改地区
export function updateRegions(data) {
  return request({
    url: '/system/regions',
    method: 'put',
    data: data
  })
}

// 删除地区
export function delRegions(regionId) {
  return request({
    url: '/system/regions/' + regionId,
    method: 'delete'
  })
}
